
<html>
<head>
<script src="test.js" type="text/javascript" charset="utf-8"></script>

<title>Testing</title>
<script language="Javascript"> 

var ind = 0;
function Change1() {

	var index = document.form1.newtitle.value;

   
   var head1 = document.getElementById("head1_1");
   var body1 = document.getElementById("body1_1");
   var div1 = document.getElementById("div1_1");
   
   head1.firstChild.nodeValue=events.bwEventList.events[index].start.longdate;
   body1.firstChild.nodeValue=events.bwEventList.events[index].eventlink;
   div1.firstChild.nodeValue=events.bwEventList.events[index].categories[0];
}
function Change2() {

	var index = document.form2.newtitle.value;

   
   var head1 = document.getElementById("head2_1");
   var body1 = document.getElementById("body2_1");
   var div1 = document.getElementById("div2_1");
   
   head1.firstChild.nodeValue=events.bwEventList.events[index].start.longdate;
   body1.firstChild.nodeValue=events.bwEventList.events[index].eventlink;
   div1.firstChild.nodeValue=events.bwEventList.events[index].categories[0];
}
function Change3() {

	var head1 = document.getElementById("head3_1");
   var body1 = document.getElementById("body3_1");
   var div1 = document.getElementById("div3_1");
   
   head1.firstChild.nodeValue=events.bwEventList.events[ind].start.longdate;
   body1.firstChild.nodeValue=events.bwEventList.events[ind].eventlink;
   div1.firstChild.nodeValue=events.bwEventList.events[ind].categories[0];
   
   ind++;
}
</script>
</head>
<body>


<div ID="div1">

<h1 ID="head1_1">Dynamic Text in JavaScript</h1>

<h2 ID="body1_1">CHANGE ME!</h2>

<div ID="div1_1"> 
AHHHHHH!!!
</div>

<form name="form1">
<input type="text" name="newtitle" size="25">
<input type="button" value="Change!"
  onClick="Change1();">
</form>
</div>


<div ID="div2">

<h1 ID="head2_1">Dynamic Text in JavaScript</h1>

<h2 ID="body2_1">CHANGE ME!</h2>

<div ID="div2_1"> 
AHHHHHH!!!
</div>

<form name="form2">
<input type="text" name="newtitle" size="25">
<input type="button" value="Change!"
  onClick="Change2();">
</form>
</div>

<div ID="div3">

<h1 ID="head3_1"> </h1>

<h2 ID="body3_1"> </h2>

<div ID="div3_1"> </div>

<form name="form3">
<input type="button" value="Change!"
  onClick="Change3();">
</form>
</div>


</body>
</html>
